<template>
  <div class="home-skeleton">
    <div class="item" v-for="item in 4" :key="item" :style="{ backgroundColor: props.bg}">
      <XtxSkeleton animate="d2" width="306px" height="306px" bg="#e4e4e4"></XtxSkeleton>
      <XtxSkeleton animate="d2" width="160px" height="24px" bg="#e4e4e4"></XtxSkeleton>
      <XtxSkeleton animate="d2" width="120px" height="24px" bg="#e4e4e4"></XtxSkeleton>
    </div>
  </div>
</template>

<script setup>
const props = defineProps({
  bg: {
    type: String,
    default: '#FFF'
  }
})
</script>

<style lang="scss" scoped>
.home-skeleton {
   display: flex;
   justify-content: space-between;
   height: 406px;
   .item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 306px;
    height: 406px;

    & .xtx-skeleton:nth-child(2) {
      margin: 16px 0;
    }
  }
}
</style>
